//商品管理-分区排期列表-配置文件
App.util.ns('Admin.Goods.JmPartition');
Admin.Goods.JmPartition.Conf = {
    columns: [
        {name: '名称', value: 'name'},
        {name: '分区样式', width: '100px',value: function(item){
            switch (item.style+'') {
                case '1':
                    return '4图';
                case '2':
                    return '6图';
                case '3':
                    return '10图';
                case '4':
                    return '单图';
                case '5':
                    return '九宫格';
            }
        }},
        {name: '九宫格样式', width: '100px',value: function(item){
            switch (item.flag+'') {
                case '1':
                    return '左上4图';
                case '2':
                    return '右上4图';
                case '3':
                    return '左下4图';
                case '4':
                    return '右下4图';
            }
        }},
        {name: '分区简介', width: '300px',value: 'introduction'},
        {name: '状态', width: '80px',value: function(item){
            switch (item.status+'') {
                case '1':
                    return '在线';
                case '2':
                    return '下线';
            }
        }},
        {name: '创建日期', width: '90px', value: function(item){
            return App.util.formator.date(item.created_at);
        }}
    ],
    form: [
        {type: 'hidden', name: 'id'},
        {type: 'input', name: 'name', title: '名称', maxLength: 40, required: true, rule: {
            type: 'str',
            range: [1, 40]
        }},
        {type: 'imgs', name: 'imgs', title: '九宫格4图',rule: {
            type: 'str'
        }},
        {type: 'chosen', name: 'style', title: '分区样式',
            items: [
                ['1', '4图'],
                ['2', '6图'],
                ['3', '10图'],
                ['4', '单图'],
                ['5', '九宫格']
            ],
            defaults: '0'
        },
        {type: 'chosen', name: 'flag', title: '九宫格样式',
            items: [
                ['1', '左上4图'],
                ['2', '右上4图'],
                ['3', '左下4图'],
                ['4', '右上4图'],
            ],
            defaults: '0'
        },
        {type: 'textarea', name: 'introduction', title: '分区简介',maxLength: 100, rule: {
            type: 'str',
            range: [0, 100]
        }},
    ]
};